package com.huikeportal.controller;


import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import com.huikeportal.controller.common.MessageManager;
import com.huikeportal.model.MessageCommon;
import com.huikeportal.model.PosDataManagerInfo;
import com.huikeportal.model.RegionTree;
import com.huikeportal.model.RegionType;
import com.huikeportal.model.SiteAllInfo;
import com.huikeportal.model.SiteDataManagerInfo;
import com.huikeportal.model.SiteType;
import com.huikeportal.model.UserInfo;
import com.huikeportal.model.common.PageDataVo;
import com.huikeportal.service.LoginService;
import com.huikeportal.service.SiteService;

/**
 * 商圈报告
 * 
 * @author focus
 * 
 */
@Controller
@Scope("prototype")
public class DistrictController {

	@Autowired
	private HttpSession session;
	
	@Autowired
	private LoginService loginService;
	
	@RequestMapping("/districtManager")
	public String siteManager(SiteDataManagerInfo siteDataManagerInfo,
			PageDataVo pageDataVo, ModelMap model) throws Exception {
		
		// 获取登录用户的信息，用来过滤该用户可以看到的Site数据
		UserInfo userInfo = (UserInfo) session.getAttribute("sessionUserName");
		userInfo = loginService.getUserInfo(userInfo);
		String menuHtml = loginService.getMenuHtml(userInfo, "districtManager");
		
		model.addAttribute("menuHtml", menuHtml);// 左侧菜单html
		return "districtManager";
	}
}
